package com.yanqu.road.server.gameplayer.module.activity.signindraw;

import com.yanqu.road.entity.activity.signindraw.SignInDrawUserData;
import com.yanqu.road.entity.activity.signindraw.config.SignInDrawDrawInfo;
import com.yanqu.road.pb.activity.SignInDrawProto;

public class SignInDrawActivityPb {

    public static SignInDrawProto.SignInDrawUserDataMsg.Builder buildUserData(SignInDrawUserData userData) {
        SignInDrawProto.SignInDrawUserDataMsg.Builder builder = SignInDrawProto.SignInDrawUserDataMsg.newBuilder();
        builder.setFreeTimes(userData.getFreeTimes());
        builder.setSignDay(userData.getSignDay());
        builder.setTodayShare(userData.getTodayShare());
        builder.setTodaySign(userData.getTodaySign());
        builder.setReward(userData.getReward());
        builder.setTodayOnlineTime(userData.getTodayOnlineTime());
        builder.setTodayOnline(userData.getTodayOnline());
        builder.setOnlineTimingStart(userData.getOnlineTimingStart());
        return builder;
    }

    public static SignInDrawProto.SignInDrawDrawConfigMsg.Builder buildDrawInfo(SignInDrawDrawInfo drawInfo) {
        SignInDrawProto.SignInDrawDrawConfigMsg.Builder builder = SignInDrawProto.SignInDrawDrawConfigMsg.newBuilder();
        builder.setRewardId(drawInfo.getRewardId());
        builder.setQuality(drawInfo.getQuality());
        builder.setReward(drawInfo.getReward());
        builder.setWeight(drawInfo.getFalseWeight());
        builder.setIsNotice(drawInfo.getIsNotice());
        builder.setSort(drawInfo.getSort());
        builder.setDay(drawInfo.getDay());
        builder.setLimit(drawInfo.getLimit());
        return builder;
    }
}
